var baseUrl = `http://192.168.4.247:`
function http(url){
  return new Promise((resolve,reject)=>{
    wx.request({
      url:baseUrl+url,
      method: 'GET', 
      header: {'content-type':'application/json'},
      dataType: 'json',
      responseType: 'text',
      
      success:(res)=>{
        resolve(res)
      },
     fail:(err)=>{
       reject(err)
     }
    
    });
  })
}
function getSET(){
  return http("3300/recommend/playlist")
}
function getHttp(offset){
  return http(`3300/songlist/list?offset=${offset}&limit=15`)
}
function getAID(id){
  return http(`3300/songlist?id=${id}`)
}


module.exports ={
  getSET,
  getHttp,
  getAID
}